angular.module('app').config(['$validationProvider', function ($validationProvider) {
    var expression = {
        phone : /^1[\d]{10}/,
        pw : function(val){
            return val.length > 5;
        },
        identify: /[\d]{6}/
    };
    var defultMessage = {
        phone: {
            success:"",
            error:"必须为11位手机号"
        },
        pw: {
            success:"",
            error:"密码长度至少6位"
        },
        identify:{
            success:"",
            error:"请输入6位验证码"
        }
    }
    $validationProvider.setExpression(expression).setDefaultMsg(defultMessage);
}]);